Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the main controller importable #5969

Merged

Conversation

simonbrunel
Copy link
Member

@simonbrunel simonbrunel commented Jan 8, 2019

Merge core/core.js in core/core.controller.js, split defaults options next to their associated code and deprecate Chart.types (not sure what it was for).

This is part of #4478, will work on helpers next.

Merge `core/core.js` in `core/core.controller.js`, split defaults options next to their associated code and deprecate `Chart.type` (not sure what it was for).
@simonbrunel simonbrunel force-pushed the chore/importable-main-controller branch from 6244a61 to 953000a Compare January 8, 2019 19:19
benmccann
benmccann previously approved these changes Jan 8, 2019
etimberg
etimberg previously approved these changes Jan 9, 2019
* for backward compatibility. Though, it can still be useful for plugins that
* would need to work on multiple charts?!
*/
Chart.instances = {};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this is helpful for iterating all charts on a page. It has been recommended in some cases

@kurkle
Copy link
Member

kurkle commented Jan 9, 2019

... and deprecate Chart.type (not sure what it was for).

Is there a alternative way to enumerate all registered chart types?
(Also had to read diff twice to make sure there is no type, but types)

@simonbrunel
Copy link
Member Author

@kurkle Chart.controllers.*

Chart.types has been introduced by d73dae0 but seems to be unused since the beginning.

kurkle
kurkle previously approved these changes Jan 9, 2019
@simonbrunel simonbrunel added this to the Version 2.8 milestone Jan 9, 2019
@simonbrunel simonbrunel dismissed stale reviews from kurkle, etimberg, and benmccann via 40f371f January 9, 2019 10:28
@simonbrunel
Copy link
Member Author

@kurkle I removed the unused local types.

@simonbrunel simonbrunel merged commit e03d8d8 into chartjs:master Jan 9, 2019
@simonbrunel simonbrunel deleted the chore/importable-main-controller branch January 9, 2019 13:40
exwm pushed a commit to exwm/Chart.js that referenced this pull request Apr 30, 2021
Merge `core/core.js` in `core/core.controller.js`, split default options next to their associated code and deprecate `Chart.types` (not sure what it was for).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants